#include "comm.hpp"
#include "log.hpp"
int main()
{
    log.Enable(CLASSFILE);
    //打开文件
    int fd =open(FIFOFILE_NAME,O_WRONLY);//以写的方式打开
    if(fd<0)
    {
        perror("open");
        exit(4);
    }
      log(Debug,"processB open done !! erromessage:%s  error code: %d",strerror(errno),errno);

    //开始通信
    while(true)
    {
        std::string line;
        getline(std::cin,line);//从键盘获取整行到line
        write(fd,line.c_str(),line.size());
    }
    //关闭文件
    close(fd);
    return 0;
}